﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true" CodeFile="admin_property_images_upload.aspx.cs" Inherits="admin_admin_property_images_upload" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <link href="../Styles/style_one_col.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBody" Runat="Server">
<div id="theForm" style="margin:10px auto 10px auto; width:650px;height:600px; border:none;" runat="server">
        <span>Add images</span>

    <asp:FileUpload ID="FileUpload1" runat="server" /><br />
    <asp:Label ID="LblImageTitle" runat="server" Text="Image Title"></asp:Label>
        <asp:TextBox ID="TxtImageTitle" runat="server" Width="200"></asp:TextBox>
        <asp:Label ID="LblTitleError" runat="server" ForeColor="#FF3300" 
            Text="Please give a title" Visible="False"></asp:Label>
        <br />
        <br />
        <asp:Button ID="BtnSaveImage" runat="server" onclick="BtnSaveImage_Click"  Text="Save Image" Width="422px" />
        <br />
        <br />
         <asp:Button ID="BtnPrevious" runat="server" onclick="BtnPrevious_Click" 
            Text="Previous (Main Image)" Width="422px" />
            <br />
            <br />

             <asp:Button ID="BtnDeleteAll" runat="server" onclick="BtnDeleteAllImages_Click" 
            Text="Remove this properties Images" Width="422px" />
            <br />
                 
            <div id="divImageList" runat="server"></div>
    
            <br />
        <asp:Label ID="LblMessage" runat="server"></asp:Label>
        <asp:GridView ID="GvFilePaths"
            runat="server" DataSourceID="ObjectDataSource1" 
            AutoGenerateColumns="False" Width="405px">
            <Columns>
                <asp:BoundField DataField="WebPropertiesAttributeID" 
                    HeaderText="WebPropertiesAttributeID" 
                    SortExpression="WebPropertiesAttributeID" Visible="False" />
                <asp:BoundField DataField="PomplingAddressID" HeaderText="PomplingAddressID" 
                    SortExpression="PomplingAddressID" Visible="False" />
                <asp:BoundField DataField="DisplayPicturePath" HeaderText="DisplayPicturePath" 
                    SortExpression="DisplayPicturePath" Visible="False" />
                <asp:BoundField DataField="picturePathOnHD" HeaderText="picturePathOnHD" 
                    SortExpression="picturePathOnHD" Visible="False" >
               
                </asp:BoundField>
                <asp:BoundField DataField="PictureTitle" HeaderText="PictureTitle" 
                    SortExpression="PictureTitle" />
                <asp:CheckBoxField DataField="IsMainImage" HeaderText="IsMainImage" 
                    SortExpression="IsMainImage" Visible="False" />
            </Columns>
        </asp:GridView>
    
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            SelectMethod="SelectAdditionalImages" TypeName="PropertyImage">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="0" Name="pomplingAddressID" 
                    QueryStringField="a" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    
    </div>
</asp:Content>

